package com.bracketbird.client.service.rtc;


import com.bracketbird.client.model.*;
import com.bracketbird.client.model.keys.*;
import com.bracketbird.client.model.tournament.*;
import com.bracketbird.clientcore.model.*;
import com.bracketbird.clientcore.model.keys.*;

import java.io.*;

/**
 *
 */
public class RTCEvent extends Model<RTCEventId> implements Serializable {
    private static final long serialVersionUID = 1669235594359647555L;

    //used to store temporerly model object so id can be set after creation on server
    private transient Model model;

    private Long localId;
    private TournamentId tournamentId;
    private Boolean deleted;
    private Integer state;
    private String name;
    private Integer type;
    private EntityId modelId;

    private TournamentVO tournamentVO;
    private TournamentLevelVO tournamentLevelVO;
    private MatchVO matchVO;
    private PlayingTeamVO playingTeamVO;
    private LevelFinishedVO levelFinishedVO;

    public RTCEvent() {

    }

    @Override
    public RTCEventId createLocalId() {
        return new RTCEventId();
    }

    public RTCEvent(RTCEventType type, Tournament t) {
        this.type = type.value();
        this.name = type.name();
        this.tournamentId = t.getId();
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public TournamentId getTournamentId() {
        return tournamentId;
    }

    public void setTournamentId(TournamentId tournamentId) {
        this.tournamentId = tournamentId;
    }

    public EntityId getModelId() {
        return modelId;
    }

    public void setModelId(EntityId modelId) {
        this.modelId = modelId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public TournamentVO getTournamentVO() {
        return tournamentVO;
    }

    public void setTournamentVO(TournamentVO tournamentVO) {
        this.tournamentVO = tournamentVO;
    }

    public TournamentLevelVO getTournamentLevelVO() {
        return tournamentLevelVO;
    }

    public void setTournamentLevelVO(TournamentLevelVO tournamentLevelVO) {
        this.tournamentLevelVO = tournamentLevelVO;
    }

    public MatchVO getMatchVO() {
        return matchVO;
    }

    public void setMatchVO(MatchVO matchVO) {
        this.matchVO = matchVO;
    }


    public PlayingTeamVO getPlayingTeamVO() {
        return playingTeamVO;
    }

    public void setPlayingTeamVO(PlayingTeamVO playingTeamVO) {
        this.playingTeamVO = playingTeamVO;
    }

    public Model getModel() {
        return model;
    }

    public void setModel(Model model) {
        this.model = model;
    }

    public LevelFinishedVO getLevelFinishedVO() {
        return levelFinishedVO;
    }

    public void setLevelFinishedVO(LevelFinishedVO levelFinishedVO) {
        this.levelFinishedVO = levelFinishedVO;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public Long getLocalId() {
        return localId;
    }

    public void setLocalId(Long localId) {
        this.localId = localId;
    }

    public String toString() {
        return "RTCEvent{" +
                "model=" + model +
                ", tournamentId=" + tournamentId +
                ", state=" + state +
                ", name='" + name + '\'' +
                ", type=" + type +
                ", modelId=" + modelId +
                ", tournamentVO=" + tournamentVO +
                ", tournamentLevelVO=" + tournamentLevelVO +
                ", matchVO=" + matchVO +
                ", playingTeamVO=" + playingTeamVO +
                ", eventLogId=" + getEventLogId() +
                '}';
    }





    
  }
